
<extend name="Index:info"/>
<block name="body">
  <style>
    div.green-black{padding:3px;margin:3px;text-align:center;}
    div.green-black a{border:#2c2c2c 1px solid;padding:2px 5px;background:url(../images/image1.gif) #2c2c2c;color:#fff;margin:0 2px 0 0;text-decoration:none;}
    div.green-black a:hover{border:#aad83e 1px solid;background:url(../images/image2.gif) #aad83e;color:#fff;}
    div.green-black a:active{border:#aad83e 1px solid;background:url(../images/image2.gif) #aad83e;color:#fff;}
    div.green-black span.current{border:#aad83e 1px solid;padding:2px 5px;font-weight:bold;background:url(../images/image2.gif) #aad83e;color:#fff;margin:0 2px 0 0;}
    div.green-black span.disabled{border:#f3f3f3 1px solid;padding:2px 5px;color:#ccc;margin:0 2px 0 0;}
  </style>
<form method="post" action="{:U('index/about_dels')}">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 留言管理</strong></div>
    <div class="padding border-bottom">
      <ul class="search">
        <li>
          <button  type="button"  class="button border-green" id="checkall"><span class="icon-check"></span> 全选</button>
          <button onclick="return del(1)" type="submit" class="button border-red"><span class="icon-trash-o"></span > 批量删除</button>
        </li>
      </ul>
    </div>
    <table class="table table-hover text-center">

      <tr>
        <th width="120">ID</th>
        <th>姓名</th>       
        <th>电话</th>
        <th>邮箱</th>
        <th width="25%">内容</th>
         <th width="120">留言时间</th>
        <th>操作</th>       
      </tr>       <volist name="list" id="vo">
        <tr>

          <td><input type="checkbox" id="about_id[]"name="about_id[]" value="{$vo.about_id}" />
            {$vo.about_id}</td>
          <td>{$vo.about_name}</td>
          <td>{$vo.about_tel}</td>
          <td>{$vo.about_email}</td>
           <td>{$vo.about_text}</td>
          <td>{$vo.about_time}</td>

          <td><div class="button-group"> <a class="button border-red" href="{:U(about_del)}?id={$vo.about_id}" onclick="return del(1)"><span class="icon-trash-o"></span> 删除</a> </div></td>

        </tr>  </volist>
      <tr>
        <td colspan="8">
          <div class="green-black">
            {$page}
          </div></td>
      </tr>
    </table>
  </div>
</form>

<script type="text/javascript">
function del(id){
	if(confirm("您确定要删除吗?")){
        session_destroy();
	} else{
	    return false;
	}
}

$("#checkall").click(function(){ 
  $("input[name='about_id[]']").each(function(){
	  if (this.checked) {
		  this.checked = false;
	  }
	  else {
		  this.checked = true;
	  }
  });
})

function DelSelect(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		var t=confirm("您确认要删除选中的内容吗？");
		if (t==false) return false; 		
	}
	else{
		alert("请选择您要删除的内容!");
		return false;
	}
}

</script>
</block>